package com.spsy.pay.service.impl;

import java.util.List;
import com.spsy.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spsy.pay.mapper.TPaymentOrderMapper;
import com.spsy.pay.domain.TPaymentOrder;
import com.spsy.pay.service.ITPaymentOrderService;

/**
 * 支付管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class TPaymentOrderServiceImpl implements ITPaymentOrderService 
{
    @Autowired
    private TPaymentOrderMapper tPaymentOrderMapper;

    /**
     * 查询支付管理
     * 
     * @param id 支付管理主键
     * @return 支付管理
     */
    @Override
    public TPaymentOrder selectTPaymentOrderById(Long id)
    {
        return tPaymentOrderMapper.selectTPaymentOrderById(id);
    }

    /**
     * 查询支付管理列表
     * 
     * @param tPaymentOrder 支付管理
     * @return 支付管理
     */
    @Override
    public List<TPaymentOrder> selectTPaymentOrderList(TPaymentOrder tPaymentOrder)
    {
        return tPaymentOrderMapper.selectTPaymentOrderList(tPaymentOrder);
    }

    /**
     * 新增支付管理
     * 
     * @param tPaymentOrder 支付管理
     * @return 结果
     */
    @Override
    public int insertTPaymentOrder(TPaymentOrder tPaymentOrder)
    {
        tPaymentOrder.setCreateTime(DateUtils.getNowDate());
        return tPaymentOrderMapper.insertTPaymentOrder(tPaymentOrder);
    }

    /**
     * 修改支付管理
     * 
     * @param tPaymentOrder 支付管理
     * @return 结果
     */
    @Override
    public int updateTPaymentOrder(TPaymentOrder tPaymentOrder)
    {
        tPaymentOrder.setUpdateTime(DateUtils.getNowDate());
        return tPaymentOrderMapper.updateTPaymentOrder(tPaymentOrder);
    }

    /**
     * 批量删除支付管理
     * 
     * @param ids 需要删除的支付管理主键
     * @return 结果
     */
    @Override
    public int deleteTPaymentOrderByIds(Long[] ids)
    {
        return tPaymentOrderMapper.deleteTPaymentOrderByIds(ids);
    }

    /**
     * 删除支付管理信息
     * 
     * @param id 支付管理主键
     * @return 结果
     */
    @Override
    public int deleteTPaymentOrderById(Long id)
    {
        return tPaymentOrderMapper.deleteTPaymentOrderById(id);
    }

    @Override
    public int updatePayOrderByOrderId(TPaymentOrder build) {
        return tPaymentOrderMapper.updatePayOrderByOrderId(build);
    }
}
